package com.ia.aistream.controller.operating;

import com.ia.aistream.common.core.domain.AjaxResult;
import com.ia.aistream.model.operating.dto.vue.DocResult;
import com.ia.aistream.service.operating.IDocDocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 查询整个文档数据
 * @author XiaoYu
 */
@Controller
@RequestMapping("/eam_aistream/api/eam/doc/document")
public class EamDocDocuemtController {

    @Autowired
    private IDocDocumentService docDocumentService;

    /**
     * 获取某个文档的所有内容
     * @param id 文档对象的id
     * @return
     */
    @PostMapping("/allData")
    @ResponseBody
    public AjaxResult list(Long id, Integer tableSize)
    {
        DocResult docResult = docDocumentService.getDocResultService(id, tableSize);
        return AjaxResult.success(docResult);
    }

//    @PostMapping("/search")
//    @ResponseBody
//    public AjaxResult search(Long id,Integer typeId)
//    {
//        return AjaxResult.success(docDocumentService.searchDataService(id, typeId));
//    }
}
